package com.design;

/**
 * 群成员
 */
public class NormalUser extends User{
    public NormalUser(GroupChat groupChat, String name) {
        super(groupChat, name);
        groupChat.addUser(this);
    }
    @Override
    protected void sendMessage(String message) {
        System.out.println(getName()+":发送消息:"+message);
        groupChat.sendMessage(message, this);
    }
    @Override
    protected void receiveMessage(String from, String message) {
        System.out.println(getName()+":收到"+from+",发送消息:"+message);
    }
}
